Skip to content

github-release-cli: Rename 'file' parameter to 'data'#16

Closed
theimpulson wants to merge 2 commits intocheton:masterfrom
theimpulson:master
Closed

github-release-cli: Rename 'file' parameter to 'data'#16
theimpulson wants to merge 2 commits intocheton:masterfrom
theimpulson:master

Conversation

@theimpulson
Copy link
Copy Markdown

This should fix #15

Signed-off-by: Aayush Gupta aayushgupta219@gmail.com

Copy link
Copy Markdown

@giuliomoro giuliomoro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this works for me

Fixes the following warning:
{ Deprecation: [@octokit/rest] "file" parameter is deprecated for ".repos.uploadReleaseAsset()". Use "data" instead
    at Object.keys.forEach.key (/usr/local/lib/node_modules/github-release-cli/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js:13145:26)
    at Array.forEach (<anonymous>)
    at Object.patchedMethod [as uploadReleaseAsset] (/usr/local/lib/node_modules/github-release-cli/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js:13142:26)
    at _callee2$ (/usr/local/lib/node_modules/github-release-cli/lib/index.js:412:50)
    at tryCatch (/usr/local/lib/node_modules/github-release-cli/node_modules/regenerator-runtime/runtime.js:62:40)
    at Generator.invoke [as _invoke] (/usr/local/lib/node_modules/github-release-cli/node_modules/regenerator-runtime/runtime.js:296:22)
    at Generator.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/github-release-cli/node_modules/regenerator-runtime/runtime.js:114:21)
    at step (/usr/local/lib/node_modules/github-release-cli/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /usr/local/lib/node_modules/github-release-cli/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
    at process._tickCallback (internal/process/next_tick.js:68:7) name: 'Deprecation' }

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Fixes the following warning:
[@octokit/rest] `const Octokit = require("@octokit/rest")` is deprecated. Use `const { Octokit } = require("@octokit/rest")` instead

This is an octokit issue and has been fixed in later versions
Ref: actions/toolkit#333

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
cheton added a commit that referenced this pull request Sep 20, 2020
@cheton
Copy link
Copy Markdown
Owner

cheton commented Sep 20, 2020

fixed in #22

@cheton cheton closed this Sep 20, 2020
cheton added a commit that referenced this pull request Sep 20, 2020
* chore: bump to v2

* docs: update README.md

* chore: add @babel/core

* chore: add @babel/register

* chore: rename babel-register to @babel/register

* chore: rename 'file' parameter to 'data' (#16)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Github warning for depreciation of "file" parameter

3 participants